Add MCP Streamable HTTP specification support for the client#321
Draft
Add MCP Streamable HTTP specification support for the client#321
Conversation
ee06e38 to
663cf20
Compare
663cf20 to
a499248
Compare
Implements the MCP Streamable HTTP specification for the Ruby SDK client: SSE response parsing via event_stream_parser, session management, 202 Accepted handling, DELETE for session termination, and protocol version header. Co-Authored-By: Ates Goral <ates@magnetiq.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
a499248 to
3a96554
Compare
This was referenced Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the MCP Streamable HTTP specification for the Ruby SDK client. Rebased from #210 (original work by @keisku) onto current
main, with merge conflict resolution, bug fixes, and all review feedback addressed.Original PR: #210 by @keisku — thank you for kicking off this effort!
Already supported (before this PR):
Accept: application/json, text/event-streamheaderapplication/jsonresponseThis PR adds:
text/event-stream(SSE) response viaevent_stream_parsergemMCP-Session-Idheader)MCP-Protocol-Version)conformance/client.rb)Changes from #210
main(resolved merge conflicts with faraday_customizer and test changes)event_stream_parseran optional dependency (like Faraday), per @koic's feedback — users add it to their Gemfile when neededCommits
Test plan
ruby -I lib -I test test/mcp/client_test.rb— 40 runs, 125 assertions, 0 failuresruby -I lib -I test test/mcp/client/http_test.rb— 20 runs, 48 assertions, 0 failuresPending TODOs (out of scope)
Last-Event-IDheader🤖 Generated with Claude Code